package ifrn.scartissue.client;

import java.io.IOException;
import java.util.List;

import marauroa.client.ClientFramework;
import marauroa.common.net.message.MessageS2CPerception;
import marauroa.common.net.message.TransferContent;

public class MarauroaClient extends ClientFramework {

	private static MarauroaClient instance;
	
	private String server = "127.0.0.1";
	
	public static MarauroaClient get() {
		if (instance == null) {
			instance = new MarauroaClient();
		}
		return instance;
	}
	

	protected MarauroaClient() {
		super("log4.properties");
	}
	
	@Override
	protected void onPerception(MessageS2CPerception message) {
	}

	@Override
	protected List<TransferContent> onTransferREQ(List<TransferContent> items) {
		return null;
	}

	@Override
	protected void onTransfer(List<TransferContent> items) {
	}

	@Override
	protected void onAvailableCharacters(String[] characters) {
	}

	@Override
	protected void onServerInfo(String[] info) {
	}

	@Override
	protected String getGameName() {
		return "scartissue";
	}

	@Override
	protected String getVersionNumber() {
		return "0";
	}

	@Override
	protected void onPreviousLogins(List<String> previousLogins) {
		
	}
	
	public String getServer() {
		return server;
	}
	
	public void setServer(String server) {
		this.server = server;
	}
	
	public void connect() throws IOException {
		this.connect(server, 9418);
	}
}
